package atm;

import javax.swing.*;
import java.awt.*;

/**
 * 转账界面
 */
public class TransferPanel extends JPanel{
    private ImageIcon sureImg = new ImageIcon("images/buttonSure.jpg");
    private ImageIcon clearImg = new ImageIcon("images/buttonClear.jpg");
    private ImageIcon offImg = new ImageIcon("images/buttonOff.jpg");
    private JButton sureBtn = new JButton(sureImg);
    private JButton clearBtn = new JButton(clearImg);
    private JButton offBtn = new JButton(offImg);
    private JLabel accountLabel = new JLabel("请输入转账账号:");
    private JTextField accountField = new JTextField();
    private JLabel sumLabel = new JLabel("请输入转账款金额:");
    private JTextField sumField = new JTextField();
    private Font font = new Font("黑体", Font.BOLD, 25);

    public TransferPanel() {
        this.setLayout(null);
        accountLabel.setBounds(245,200,240,50);
        accountLabel.setFont(font);
        accountField.setBounds(450,200,250,50);
        accountField.setFont(font);
        sumLabel.setBounds(230,260,240,50);
        sumLabel.setFont(font);
        sumField.setBounds(450,260,250,50);
        sumField.setFont(font);
        sureBtn.setBounds(884,240,140,50);
        clearBtn.setBounds(884,310,140,50);
        offBtn.setBounds(884,380,140,50);
        this.add(accountLabel);
        this.add( accountField);
        this.add(sumLabel);
        this.add(sumField);
        this.add(sureBtn);
        this.add(clearBtn);
        this.add(offBtn);
        this.setOpaque(false);
    }
}
